Skip to main content

Week 3

Milestones

  • Implement the above approach and create a PR for the same

Approach

Since we need to create a method so that we can use it directly in Doc-Gen, we need to ensure that this method is free of any database dependency so we need to decouple the PrismaService from the RenderService and make it independent of the templateController so that it can be used as a Service in Doc-Gen.

Essentially it will follow a similar flow to the controller in templater but here Doc-Gen will provide its own template so we can easily get rid of the Prismaservice dependency.

Contributions

Here is the link to the PR: PR

Learnings

  • How to create and use the service in a controller
  • Abstracting the PrismaService from the RenderService
  • How to use the RenderService in Doc-Gen

Next Steps

  • locally add Templater as a dependency in Doc-Gen and use the RenderService to render the templates
  • Test the endpoint in Doc-Gen to ensure that it is working as expected